﻿using Comain;
using Comain.DTO;
using Common;
using IService.Rempos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    /// <summary>
    /// 商品服务接口
    /// </summary>
    public interface IGoodsService
    {
        /// <summary>
        /// 获取所有商品品牌信息
        /// </summary>
        /// <returns></returns>
        IQueryable<Goods> ShowGoods();
        /// <summary>
        /// 获取类别信息
        /// </summary>
        /// <returns></returns>
        List<Cascaderitrm> ShowGoodsTypes(int perentid);
        /// <summary>
        /// 显示数据
        /// </summary>
        /// <returns></returns>
        Task<PageComm<List<GoodsDTO>>> Show(string? name, int? goodid, DateTime? time, int pageIndex, int pageSize);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="goodsd"></param>
        /// <returns></returns>
        Task<bool> AddGood(T_Goods goodsd);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DeleteAsync(int id);
        /// <summary>
        /// 状态修改
        /// </summary>
        /// <param name="id"></param>
        /// <param name="states"></param>
        /// <returns></returns>
        Task<int> State(int id, int states);
        /// <summary>
        /// 获取商品信息（反填）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<T_Goods> GetT_Goods(int id);
        /// <summary>
        /// 修改商品信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> UpdateGood(T_Goods goodsds);
    }
}
